package com.xinou.daily_report.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.util.Date;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinou.common.base.database.EntityBase;
import com.xinou.daily_report.utils.ConstUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


/**
 * <p>
 *
 * </p>
 *
 * @author ${author}
 * @since 2021-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysFruit对象", description="")
@NoArgsConstructor
public class SysFruit extends EntityBase {

    public SysFruit(Long userId, String reason, Double singleScore) {
        this.userId = userId;
        this.reason = reason;
        this.singleScore = singleScore;
        this.commanderId= ConstUtil.DEFAULT_SYSTEM_ID;
        this.insertTime=LocalDateTime.now();
    }

    public SysFruit(Long userId, String reason, Double singleScore,Long commanderId) {
        this.userId = userId;
        this.reason = reason;
        this.singleScore = singleScore;
        this.commanderId= commanderId;
        this.insertTime=LocalDateTime.now();
    }



    private Long userId;

    private Long commanderId;

    private Boolean isUrge;

    private String reason;

    private Double singleScore;


    private Integer state;

    private Integer fruitType;

    private String bill;


    @ApiModelProperty(value = "插入时间 yyyy-MM-dd HH:mm:ss", example = "2020-11-28 00:12:23", required = true)
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "insert_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime insertTime;



}
